import { defHttp } from '/@/utils/http/axios'
import { ErrorMessageMode } from '/#/axios'

enum Api {
  AddPartner='/api/website/admin/partner/add',
  Register='/api/website/admin/partner/register',
  GetSettle='/api/website/admin/settle/get',
  SettleList='/api/website/admin/settle/page',
  DelSettle='/api/website/admin/settle/delete',
  SendSettle='/api/website/admin/settle/send',
  CommitSettle='/api/website/admin/settle/pay/commit',
  GetSettledetail='/api/website/admin/settle/detail/get',
  DelSettledetail='/api/website/admin/settle/detail/delete',
 
}


//获取提成列表
export function getSettle(params:any) {
  return defHttp.get(
    { url: Api.GetSettle,
      params,
     },
  )
}
//获取提成列表
export function settleList(params:any) {
  return defHttp.get(
    { url: Api.SettleList,
      params,
     },
  )
}
//资料录入
export function addPartner(params:any) {
  return defHttp.post(
    { url: Api.AddPartner,
      params,
     },
  )
}
//注册
export function registerApi(params:any) {
  return defHttp.post(
    { url: Api.Register,
      params,
     },
  )
}
//删除
export function delSettle(params:any) {
  return defHttp.post(
    { url: Api.DelSettle,
      params,
     },
  )
}
//删除业绩
export function delSettledetail(params:any) {
  return defHttp.post(
    { url: Api.DelSettledetail,
      params,
     },
  )
}
//提交单据
export function commitSettle(params:any) {
  return defHttp.post(
    { url: Api.CommitSettle,
      params,
     },
  )
}
//发送提成
export function sendSettle(params:any) {
  return defHttp.post(
    { url: Api.SendSettle,
      params,
     },
  )
}
//获取业绩
export function getSettledetail(params:any) {
  return defHttp.get(
    { url: Api.GetSettledetail,
      params,
     },
  )
}
